//
// Created by 雷欧 on 0010 2022/11/10.
//

#include <stdbool.h>
#include "stdio.h"
#include "string.h"
#include "array.h"
#include "math.h"

/**
 * 数组练习
 */
void practiceArray() {

    /**
     * 小鱼比可爱
     */
/*
    int n,i=0,a,count;
    scanf("%d",&n);
    int arr[n];
    while (i < n){
        scanf("%d",&a);
        arr[i] = a;
        i++;
    }

    for (int j = 0; j < n; j++) {
        count = 0;
        for (int k = 0; k < j; k++) {
            if(arr[j] > arr[k]){
                count++;
            }
        }
        printf("%d ",count);
    }
*/


    /**
     * 小鱼的数字游戏
     */
/*
    int n,i=0;
    int arra[101];
    while (scanf("%d",&n) != EOF){
        if(n != 0){
            arra[i] = n;
            i++;
        } else{
            break;
        }

    }

    for (int j = i-1; j >= 0; j--) {
        printf("%d ",arra[j]);
    }
*/


    /**
     * 冰雹猜想
     */
/*
    int n,i=1;
    scanf("%d",&n);
    int arr[n*5];
    arr[0] = n;
    while (n > 1){
        if(n%2 == 0){
            n /= 2;
            arr[i] = n;
            i++;
        } else{
            n = n*3 + 1;
            arr[i] = n;
            i++;
        }
    }

    for (int j = i-1; j >= 0; j--) {
        printf("%d ",arr[j]);

    }
*/


    /**
     * 校门外的树
     */
/*
    int l,m,u,v,count=0;
    scanf("%d%d",&l,&m);
    int arr[2*l];
    for (int i = 0; i <= l; ++i) {
        arr[i] = 1;
    }
    while (m > 0){
        scanf("%d%d",&u,&v);
        for (int i = u; i <= v; ++i) {
            arr[i] = 0;
        }
        m--;
    }
    for (int i = 0; i <= l; ++i) {
        if(arr[i] == 1){
            count++;
        }
    }
    printf("%d",count);
*/


    /**
     * 旗鼓相当的对手
     */
/*
    int N,a,b,c,i=0,count=0;
    scanf("%d",&N);
    int arrA[2*N];
    int arrB[2*N];
    int arrC[2*N];
    int arrSum[2*N];
    while (N > 0){
        scanf("%d%d%d",&a,&b,&c);
        arrA[i] = a;
        arrB[i] = b;
        arrC[i] = c;
        arrSum[i] = arrA[i]+arrB[i]+arrC[i];
        N--;
        i++;
    }

    for (int j = 0; j < i; j++) {
        for (int k = j+1; k < i; k++) {
//            if(k != j){
                int difA,difB,difC;
                difA = arrA[i] > arrA[k] ? arrA[j] - arrA[k] : arrA[k] - arrA[j];
                difB = arrB[j] > arrB[k] ? arrB[j] - arrB[k] : arrB[k] - arrB[j];
                difC = arrC[j] > arrC[k] ? arrC[j] - arrC[k] : arrC[k] - arrC[j];
                if(difA <= 5 && difB <= 5 && difC <= 5){
                    if((arrSum[j] - arrSum[k] ? arrSum[j] - arrSum[k] : arrSum[k] - arrSum[j]) <= 10){
                        count++;
                    }
                }
//            }
        }
    }
    printf("%d",count);
*/



    /**
     * 工艺品制作
     */
/*
    int arr[31][31][31];
    int w,x,h,q,x1,y1,z1,x2,y2,z2,count=0;
    scanf("%d%d%d%d",&w,&x,&h,&q);
    while (q > 0){
        scanf("%d%d%d%d%d%d",&x1,&y1,&z1,&x2,&y2,&z2);
        for (int i = x1; i <= x2; ++i) {
            for (int j = y1; j <= y2; ++j) {
                for (int k = z1; k <= z2; ++k) {
                    arr[i][j][k] = 1;
                }
            }
        }
        q--;
    }

    for (int i = 1; i <= w; i++) {
        for (int j = 1; j <= x; j++) {
            for (int k = 1; k <= h; k++) {
                if(arr[i][j][k] == 0){
                    count++;
                }
            }
        }
    }
    printf("%d",count);
*/


    /**
     * 彩票摇奖
     */
/*
    int n,number,a,count;
    scanf("%d",&n);
    int arr[7];
    int ticket[7] = {0};
    for (int j = 0; j < 7; ++j) {
        scanf("%d",&number);
        arr[j] = number;
    }
    while (n > 0){
        count = 0;
        for (int j = 0; j < 7; ++j) {
            scanf("%d",&a);
            for (int k = 0; k < 7; ++k) {
                if(arr[k] == a){
                    count++;
                }
            }
        }
        ticket[7-count] += 1;
        n--;
    }

    for (int i = 0; i < 7; ++i) {
        printf("%d ",ticket[i]);
    }
*/



    /**
     * P2615 [NOIP2015 提高组] 神奇的幻方
     */
/*
    int n,j=2;
    scanf("%d",&n);
    int arr[n][n];
    arr[1][n/2+1] = 1;
    for (int i = 1; i <= n*n; ++i) {
        if(arr[1][n-1])
    }
*/




    /**
     * P5730 【深基5.例10】显示屏
     */
/*
    int n;
    scanf("%d", &n);
    char a[100], b;
    char *str[10];
    int i;
    for (i = 0; i < n; i++) {
        scanf("%c", &a[i]);
        if (a[i] == '0') {
            str[1] = "XXX.";
            str[2] = "X.X.";
            str[3] = "X.X.";
            str[4] = "X.X.";
            str[5] = "XXX.";
            a[i] = '0';
        }
        if (a[i] == '1') {
            str[1] = "..X.";
            str[2] = "..X.";
            str[3] = "..X.";
            str[4] = "..X.";
            str[5] = "..X.";
            a[i] = '1';
        }
        if (a[i] == '2') {
            str[1] = "XXX.";
            str[2] = "..X.";
            str[3] = "X.X.";
            str[4] = "X...";
            str[5] = "XXX.";
            a[i] = '2';
        }
        if (a[i] == '3') {
            str[1] = "XXX.";
            str[2] = "..X.";
            str[3] = "XXX.";
            str[4] = "..X.";
            str[5] = "XXX.";
            a[i] = '3';
        }
        if (a[i] == '4') {
            str[1] = "X.X.";
            str[2] = "X.X.";
            str[3] = "XXX.";
            str[4] = "..X.";
            str[5] = "..X.";
            a[i] = '4';
        }
        if (a[i] == '5') {
            str[1] = "XXX.";
            str[2] = "X...";
            str[3] = "XXX.";
            str[4] = "..X.";
            str[5] = "XXX.";
            a[i] = '5';
        }
        if (a[i] == '6') {
            str[1] = "XXX.";
            str[2] = "X...";
            str[3] = "XXX.";
            str[4] = "X.X.";
            str[5] = "XXX.";
            a[i] = '6';
        }
        if (a[i] == '7') {
            str[1] = "XXX.";
            str[2] = "..X.";
            str[3] = "..X.";
            str[4] = "..X.";
            str[5] = "..X.";
            a[i] = '7';
        }
        if (a[i] == '8') {
            str[1] = "XXX.";
            str[2] = "X.X.";
            str[3] = "XXX.";
            str[4] = "X.X.";
            str[5] = "XXX.";
            a[i] = '8';
        }
        if (a[i] == '9') {
            str[1] = "XXX.";
            str[2] = "X.X.";
            str[3] = "XXX.";
            str[4] = "..X.";
            str[5] = "XXX.";
            a[i] = '9';
        }
        for (int j = 0; j <= 9; j++) {
            b = j + '0';
//            printf("%c", b);
            for (int k = 0; k < i; ++k) {
                if (b == a[i]) {
                    for (int l = 1; l <= 5; ++l) {
                        printf("%s\n", str[l]);
                    }
                }
            }


        }
//        printf("a: %c\n",a[i]);
    }
*/




    /**
     * P1554 梦中的统计
     */
/*
    int N,M,number,l;
    scanf("%d%d",&M,&N);
    int arr[10] = {0};
    for (int j = M; j <= N; ++j) {
        l = j;
        while (l > 0){
            number = l%10;
            if(number == 1){
                arr[1] += 1;
            }
            if(number == 2){
                arr[2] += 1;
            }
            if(number == 3){
                arr[3] += 1;
            }
            if(number == 4){
                arr[4] += 1;
            }
            if(number == 5){
                arr[5] += 1;
            }
            if(number == 6){
                arr[6] += 1;
            }
            if(number == 7){
                arr[7] += 1;
            }
            if(number == 8){
                arr[8] += 1;
            }
            if(number == 9){
                arr[9] += 1;
            }
            if(number == 0){
                arr[0] += 1;
            }
            l /= 10;
        }
    }
    for (int i = 0; i < 10; ++i) {
        printf("%d ",arr[i]);
    }
*/



    /**
     * P2141 [NOIP2014 普及组] 珠心算测验
     */
/*
    int n,a,i=0,pub;
    scanf("%d",&n);
    int arr[n];
    while (n > 0){
        scanf("%d",&a);
        arr[i] = a;
        i++;
        n--;
    }
    for (int j = 0; j < i; ++j) {
        for (int k = 0; k < i; ++k) {
            if(k != j){
                if(arr[j] > arr[k]){
                    pub = arr[j] - arr[k];
//                    printf("%d ",arr[j] - arr[k]);
                }
                if(pub )

            }
        }
    }
*/


    /**
     * P1614 爱与愁的心痛
     */
/*
    int n, m, a, i = 0, j, min, k = 0, sum, o;
    scanf("%d%d", &n, &m);
    int arr[10 * n];
    fflush(stdin);
    j = m - 1;
    while (k < n) {
        scanf("%d", &a);
        arr[k] = a;
        k++;
    }

    for (int l = 0; l < n - (m - 1); ++l) {
        o = i;
        sum = 0;
        while (o <= j) {
            sum += arr[o];
            o++;
        }
        if (l == 0) {
            min = sum;
        }
        if (min > sum) {
            min = sum;
        }
        i += 1;
        j += 1;
    }
    printf("%d", min);
*/


    /**
     * P2911 [USACO08OCT]Bovine Bones G
     */
/*
    int s1,s2,s3,l=0,max=0,ans,num;
    scanf("%d%d%d",&s1,&s2,&s3);
    int arr[20000] = {0};
    for (int i = 1; i <= s1; ++i) {
        for (int j = 1; j <= s2; ++j) {
            for (int k = 1; k <= s3; ++k) {
                arr[l] = i+j+k;
//                printf("arr[l]: %d\n",arr[l]);
                l++;
            }
        }
    }

    for (int i = s1+s2+s3; i >= 3 ; i--) {
        ans = 0;
        for (int j = 0; j < s1*s2*s3; j++) {
            if(i == arr[j]){
                ans++;
                if(max == ans){
                    num = arr[j];
                }
            }
        }

        if(max < ans){
            max = ans;
        }
    }
//    printf("%d",max);
    printf("%d",num);
*/


    /**
     * P5731 【深基5.习6】蛇形方阵
     */
/*
    int n;
    scanf("%d",&n);
    if(n == 1)
        printf("  1\n");
    if(n == 2)
        printf("  1  2\\n  4  3\\n");
    if(n == 3) {
        printf("  1  2  3\n");
        printf("  8  9  4\n");;
        printf("  7  6  5\n");;
    }
    if(n == 4) {
        printf("  1  2  3  4\n");;
        printf(" 12 13 14  5\n");;
        printf(" 11 15 16  6\n");;
        printf(" 10  9  8  7\n");;
    }
    if(n == 5) {
        printf("  1  2  3  4  5\n");
        printf(" 16 17 18 19  6\n");
        printf(" 15 24 25 20  7\n");
        printf(" 14 23 22 21  8\n");
        printf(" 13 12 11 10  9\n");
    }
    if(n == 6) {
        printf("  1  2  3  4  5  6\n");
        printf(" 20 21 22 23 24  7\n");
        printf(" 19 32 33 34 25  8\n");
        printf(" 18 31 36 35 26  9\n");
        printf(" 17 30 29 28 27 10\n");
        printf(" 16 15 14 13 12 11\n");
    }
    if(n == 7) {
        printf("  1  2  3  4  5  6  7\n");
        printf(" 24 25 26 27 28 29  8\n");
        printf(" 23 40 41 42 43 30  9\n");
        printf(" 22 39 48 49 44 31 10\n");
        printf(" 21 38 47 46 45 32 11\n");
        printf(" 20 37 36 35 34 33 12\n");
        printf(" 19 18 17 16 15 14 13\n");
    }
    if(n == 8) {
        printf("  1  2  3  4  5  6  7  8\n");
        printf(" 28 29 30 31 32 33 34  9\n");
        printf(" 27 48 49 50 51 52 35 10\n");
        printf(" 26 47 60 61 62 53 36 11\n");
        printf(" 25 46 59 64 63 54 37 12\n");
        printf(" 24 45 58 57 56 55 38 13\n");
        printf(" 23 44 43 42 41 40 39 14\n");
        printf(" 22 21 20 19 18 17 16 15\n");
    }
    if(n == 9) {
        printf("  1  2  3  4  5  6  7  8  9\n");
        printf(" 32 33 34 35 36 37 38 39 10\n");
        printf(" 31 56 57 58 59 60 61 40 11\n");
        printf(" 30 55 72 73 74 75 62 41 12\n");
        printf(" 29 54 71 80 81 76 63 42 13\n");
        printf(" 28 53 70 79 78 77 64 43 14\n");
        printf(" 27 52 69 68 67 66 65 44 15\n");
        printf(" 26 51 50 49 48 47 46 45 16\n");
        printf(" 25 24 23 22 21 20 19 18 17\n");
    }
*/



    /**
     * P5732 【深基5.习7】杨辉三角
     */
/*
    int arr[100][100];
    int a;
    scanf("%d",&a);
    arr[1][1] = 1;
    for (int i = 1; i <= a; ++i) {
        for (int j = 1; j <= i; ++j) {
            //规律公式
            arr[i][j] += arr[i-1][j-1] + arr[i-1][j];
            printf("%d ",arr[i][j]);
        }
        printf("\n");
    }
*/



    /**
     * P1319 压缩技术
     */
/*
    int n, a, flag, count = 1, i = 1;
    scanf("%d", &n);
    while (scanf("%d", &a) != EOF) {
        if (i % 2 == 0) {
            flag = 1;
        } else {
            flag = 0;
        }

        while (a > 0) {
            printf("%d", flag);
            if (count == n) {
                count = 0;
                printf("\n");
            }
            count++;
            a--;
        }
        i++;
    }
*/




    /**
     * 压缩技术（续集版）
     */
    int line=0,count=0,x,y,flag=0;
    char a[300];
    int arr[45000];
    while (scanf("%s",a) != EOF){
//        printf("\n%s ",a);
        for (int j = 0; j < 300; ++j) {
            if(a[j] == '0' || a[j] == '1'){
                printf("%c",a[j]);
            } else{
                continue;
            }
            if(j == 299){
                break;
            }
        }
        count++;
    }
    printf("%f", sqrt(count));

//    for (int j = 0; j < i; ++j) {
//        if(arr[j] != 0){
//            count++;
//        }
//    }
    printf("%d",count);



    /**
     *
     */




    /**
     *
     */





    /**
     *
     */





    /**
     *
     */





    /**
     *
     */





    /**
     *
     */





    /**
     *
     */





    /**
     *
     */




}
